import React, { Component } from "react";

import Banner from "./Banner";

export default class Main extends Component {
  constructor() {
    super();
    this.state = {
      list: [1, 2, 3, 4, 5, 6, 7, 8, 9],
      title: "轮播图",
    };
  }
  render() {
    const { list, title } = this.state;
    return (
      <div>
        这里是Main组件
        <Banner title={title} list={list} /> {/* 父传子 */}
        <Banner/> {/* 父传子 */}
      </div>
    );
  }
}
